﻿<UserControl x:Class="Levfier.GUI.EditorControls.Parameters.KnobControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" Width="64" Height="64">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <!--Dark Theme-->
                <ResourceDictionary Source="../../../Themes/Metro/Dark/MetroDark.MSControls.Core.Implicit.xaml" />
                <!--<ResourceDictionary Source="../Dark/MetroDark.MSControls.Toolkit.Implicit.xaml" />-->
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="5*"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Ellipse x:Name="DragKnob" Fill="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" Canvas.Left="113" Canvas.Top="113" Width="34" Margin="13,13,17,6" MouseLeftButtonDown="Ellipse_MouseLeftButtonDown" MouseMove="Ellipse_MouseMove" MouseLeftButtonUp="Ellipse_MouseLeftButtonUp"/>
        <Label x:Name ="valueLabel" FontSize="9" Content="x.x" HorizontalAlignment="Left" Margin="15,18,0,0" VerticalAlignment="Top" Width="30" Height="23" Foreground="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" MouseLeftButtonDown="Ellipse_MouseLeftButtonDown"/>
        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" StrokeThickness="6" Margin="-1.875,-1.625,1.875,1.625" MouseLeftButtonDown="Path_MouseLeftButtonDown" Grid.RowSpan="2">
            <Path.Data>
                <PathGeometry>
                    <PathFigure StartPoint="32, 52">
                        <ArcSegment Point="52, 32" Size="20, 20" IsLargeArc="True" SweepDirection="Clockwise" RotationAngle="0" />
                    </PathFigure>
                </PathGeometry>
            </Path.Data>
        </Path>
        <Path x:Name="pathArcParam" Stroke="#00aaDE" StrokeThickness="6" Margin="-1.875,-1.625,1.875,1.625" Grid.RowSpan="2">
            <!--MouseLeftButtonDown="Path_MouseLeftButtonDown" MouseMove="Path_MouseMove">-->
            <Path.Data>
                <PathGeometry>
                    <PathFigure StartPoint="32, 52">
                        <ArcSegment x:Name="arcSeg" Point="32, 12" Size="20, 20" IsLargeArc="False" SweepDirection="Clockwise" RotationAngle="0" />
                    </PathFigure>
                </PathGeometry>
            </Path.Data>
        </Path>
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4*"/>
                <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>
            <TextBlock x:Name="paramName" Grid.Column="0" Foreground="{DynamicResource ForegroundBrush}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            <Button x:Name="deleteButton" Grid.Column="1" Foreground="{DynamicResource ForegroundBrush}" Content="x" VerticalAlignment="Center" HorizontalAlignment="Center" Click="DeleteButton_Click"/>
        </Grid>
    </Grid>
</UserControl>
